<?php
require_once 'adminmenu.php';
?>
<div class="well">
<h4>All roles:</h4>
<hr />
    <table class="table table-striped">
        <thead>
            <tr><th>#</th><th>name</th><th>actions</th></tr>
        </thead>
        <tbody>
            <?php
            $content = new Models_User();
            $roles = $content->getAllRoles();
            foreach ($roles as $role)
            {
                ?>
                    <tr>
                        <td><?php echo $role['id']; ?></td><td><?php echo $role['name']; ?></td><td>
                            <a class="btn btn-primary btn-mini" href="#"><i class="icon-pencil icon-white"></i></a>
                            <a class="btn btn-primary btn-mini" href="/<?php $content->printPath(); ?>admin/permissions/<?php echo $role['id']; ?>"><i class="icon-book icon-white"></i></a>
                            <a class="btn btn-primary btn-mini" href="#"><i class="icon-plus icon-white"></i><i class="icon-user icon-white"></i></a>
                            <a class="btn btn-danger btn-mini" href="/"><i class="icon-remove icon-white"></i></a>
                        </td>
                    </tr>
                 <?php
            }
            ?>
        </tbody>
    </table>
</div>